read Man Page 您所在的位置:网站首页 read command read Man Page

read Man Page

2023-03-19 10:41| 来源: 网络整理| 查看: 265

Syntax read [-ers] [-a aname] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-r] [-s] [-t timeout] [-u fd] [name...] Key -a aname The words are assigned to sequential indices of the array variable aname, starting at 0. aname is unset before any new values are assigned. Other name arguments are ignored.

-d delim The first character of delim is used to terminate the input line, rather than newline. -e If the standard input is coming from a terminal, readline is used to obtain the line. -i text If readline is being used to read the line, text is placed into the editing buffer before editing begins. -n nchars read returns after reading nchars characters rather than waiting for a complete line of input. -N nchars read returns after reading exactly nchars characters rather than waiting for a complete line of input, unless EOF is encountered or read times out. Delimiter characters encountered in the input are not treated specially and do not cause read to return until nchars characters are read. -p prompt Display prompt on standard error, without a trailing newline, before attempting to read any input. The prompt is displayed only if input is coming from a terminal. -r Do not treat a Backslash as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair can not be used as a line continuation. Without this option, any backslashes in the input will be discarded. You should almost always use the -r option with read.

-s Silent mode. If input is coming from a terminal, characters are not echoed. -t timeout Cause read to time out and return failure if a complete line of input is not read within timeout seconds. This option has no effect if read is not reading input from the terminal or a pipe. -u fd Read input from file descriptor fd. name The name(s) to assign to each word. If no names are supplied, the line read is assigned to the variable $REPLY.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有